//
//  MatchCategory.m
//  NJYouthOlypic
//
//  Created by Xiu on 6/28/13.
//  Copyright (c) 2013 Xiu. All rights reserved.
//

#import "MatchCategory.h"

@implementation MatchCategory


- (id)initWithDictionary:(NSDictionary*)dict
{
  self = [super init];
  if (self) {
    self.mcId = [dict objectForKey:@"id"];
    self.title = [[[dict objectForKey:@"name"] componentsSeparatedByString:@","] objectAtIndex:0];
    self.subtitle = [[[dict objectForKey:@"name"] componentsSeparatedByString:@","] objectAtIndex:1];
    self.days = [[dict objectForKey:@"days"] componentsSeparatedByString:@","];
    self.imageName = [NSString stringWithFormat:@"%@", [dict objectForKey:@"pic"]];
  }
  return self;
}

- (UIImage*)image{
  return [UIImage imageNamed:self.imageName];
}


@end
